<template>
  <div class="fenlu-container">
    <div class="fenlu-content">
      <div class="fenlu">
        <div class="top">
          <div class="l">监测分路</div>
          <div class="r font-good-time">
            <VueCountTo :startVal=0 :endVal="Number(deviceTotal)" />
            <i>路</i>
          </div>
        </div>
        <div class="middle">
          <div class="l">在线分路</div>
          <div class="r font-good-time">
            <VueCountTo :startVal=0 :endVal="Number(deviceOnlineSize)" />
            <i>路</i>
          </div>
        </div>
        <div class="bottom">
          <div class="l">离线分路</div>
          <div class="r font-good-time">
            <VueCountTo :startVal=0 :endVal="Number(deviceOfflineSize)" />
            <i>路</i>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { mapState } from "vuex";
import VueCountTo from "vue-count-to";
export default {
  components: { VueCountTo },
  computed: {
    ...mapState({
      deviceOfflineSize: state => state.cityInfo.deviceOfflineSize,
      deviceOnlineSize: state => state.cityInfo.deviceOnlineSize,
      deviceTotal: state => state.cityInfo.deviceTotal
    })
  }
};
</script>
